package cn.mdmbct.douyin.spring.example.enums;


public enum ResultCode {


    SUCCESS(true, 200, "操作成功！"),


    FAIL(false, 400, "操作失败"),

    SERVER_ERROR(false, 500, "服务器异常")

    ;



    private final boolean success;
    private final int code;
    private final String message;

    ResultCode(boolean success, int code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }

    public boolean isSuccess() {
        return success;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
